unit frm_FilterDebtors;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, shbl_Filter, PropFilerEh, DBGridEh, DB, FIBDataSet, pFIBDataSet,
  DBLookupEh, StdCtrls, Mask, DBCtrlsEh, PropStorageEh, ActnList, Menus,
  Buttons, ExtCtrls;

type
  TfrmFilterDebtors = class(TshblFilter)
    cbName1: TDBCheckBoxEh;
    cbStreet2: TDBCheckBoxEh;
    cbHouse3: TDBCheckBoxEh;
    cbApparts4: TDBCheckBoxEh;
    eName: TDBEditEh;
    eHouse: TDBEditEh;
    eApparts: TDBEditEh;
    eStreet: TDBLookupComboboxEh;
    dsStreets: TpFIBDataSet;
    dscStreets: TDataSource;
    cbPhone5: TDBCheckBoxEh;
    cbNotes6: TDBCheckBoxEh;
    ePhone: TDBEditEh;
    eNotes: TDBEditEh;
    cbDeleted6: TDBCheckBoxEh;
    pDeleted: TPanel;
    cbDeleted: TRadioButton;
    RadioButton3: TRadioButton;
    procedure FormCreate(Sender: TObject);
    procedure aApplyExecute(Sender: TObject);
    procedure cbName1KeyPress(Sender: TObject; var Key: Char);
    procedure cbName1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmFilterDebtors: TfrmFilterDebtors;

implementation

uses rst_Debtors, MAIN;

{$R *.dfm}

procedure TfrmFilterDebtors.FormCreate(Sender: TObject);
begin
  dsStreets.Open;

end;

procedure TfrmFilterDebtors.aApplyExecute(Sender: TObject);
begin
  Self.Close;
  (Self.Owner as TrstDebtors).aFilterApply;
end;

procedure TfrmFilterDebtors.cbName1KeyPress(Sender: TObject;
  var Key: Char);
begin
  inherited;
  if Key = #13 then
    Self.FindNextControl((Sender as TWinControl), true, true, false).SetFocus;
end;

procedure TfrmFilterDebtors.cbName1Click(Sender: TObject);
begin
  EnableControlByTag(Self, (Sender as TWinControl), (Sender as TWinControl).Tag, (Sender as TDBCheckBoxEh).Checked);
end;

end.
